home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / pcscheme / geneva / sources.exe / SOURCES / ASM / SWINT.ASM < prev    next >
Encoding:
Assembly Source File  |  1992-11-18  |  1.3 KB  |  45 lines

  1. ;* SWINT.ASM
  2. ;************************************************************************
  3. ;*                                    *
  4. ;*        PC Scheme/Geneva 4.00 Borland TASM code            *
  5. ;*                                    *
  6. ;* (c) 1985-1988 by Texas Instruments, Inc. See COPYRIGHT.TXT        *
  7. ;* (c) 1992 by L. Bartholdi & M. Vuilleumier, University of Geneva    *
  8. ;*                                    *
  9. ;*----------------------------------------------------------------------*
  10. ;*                                    *
  11. ;*        Dispatch a software interrupt                *
  12. ;*                                    *
  13. ;*----------------------------------------------------------------------*
  14. ;*                                    *
  15. ;* Created by: John Jensen        Date: 1985            *
  16. ;* Revision history:                            *
  17. ;* - 18 Jun 92:    Renaissance (Borland Compilers, ...)            *
  18. ;*                                    *
  19. ;*                    ``In nomine omnipotentii dei''    *
  20. ;************************************************************************
  21. IDEAL
  22. %PAGESIZE    60, 132
  23. MODEL    medium
  24. LOCALS    @@
  25.  
  26.     INCLUDE    "scheme.ash"
  27.  
  28. CODESEG
  29.  
  30. PROC C    sw_int    USES si di, @@intnum, @@ax, @@bx, @@cx, @@dx
  31.     mov    al, [byte @@intnum]
  32.     mov    [cs:@@intno], al    ; Self-modify interrupt call in code
  33.     mov    ax, [@@ax]
  34.     mov    bx, [@@bx]
  35.     mov    cx, [@@cx]
  36.     mov    dx, [@@dx]
  37.     jmp    @@proceed        ; required to flush instruction queue
  38. @@proceed:
  39.     DB    0cdh             ; Byte code for INT instruction
  40. @@intno DB    070h             ; Byte code for interrupt number
  41.     ret
  42. ENDP    sw_int
  43.  
  44.     END
  45.